require 'clockwork'
require './config/boot'
require './config/environment'

module Clockwork
  handler do |job|
    system "rails runner '#{job}'"
  end

  every(2.second, 'SubscriptionCheck.schedule_checks')
  every(2.second, 'BalanceCheck.schedule_checks')
  every(2.second, 'TransactionSubscriptionCheck.schedule_checks')
  every(2.second, 'TransactionReceiptSubscriptionCheck.schedule_checks')

end
